<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.*,model.*,util.*,control.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head> 
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <link href="../css/front.css" rel="stylesheet" type="text/css" />
     <link href="../css/frontstyle.css" rel="stylesheet" type="text/css" />
    <title>文件下载</title>
  </head>
  
  <body>
   <div id="fronttop">
  <div class="fronttou">
    <img src="../pictures/shidaxiaohui.jpg" width="149" height="105" />
    东北师范大学学生社团联合会
</div>
  <div id="fronttopnavigation">
    <table width="995" height="50" border="0" align="center">
      <tr>
        <td width="71"><div align="center" class="STYLE2" ><a href="../index.jsp">首页</a></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../shetuanjieshao.jsp">社团介绍</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../darenxiu.jsp">达人秀</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../shetuanxinwen.jsp">社团新闻</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../sheliandongtai.jsp">社联动态</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../huodonggonggao.jsp">活动公告</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../gongtongguanzhu.jsp">共同关注</a></span></div></td>
        <td width="71"><div align="center" ><span  class="STYLE2"><a href="../resources/resources_download.jsp">文件下载</a></span></div></td>
        <td width="71"><div align="center" class="STYLE2"><a href="../woyaoliuyan.jsp">我要留言</a></div></td>
      </tr>
    </table>
  </div>
  <div id="fronttopflash"><img src="../pictures/shida.jpg" width="994" height="260"></div>
</div>
<div id="frontlittlenavigation">
  <table width="990" height="34" border="0">
  <tr>
      <td width="984">&nbsp;&nbsp;&nbsp;&nbsp;当前位置：<a href="index.jsp">首页</a>&gt;&gt;达人秀&gt;&gt;列表 </td>
    </tr>
  </table>
</div>
<div id="frontarticle"  style="background:#FFF;"  align="center">
   
   <%
  String errors=(String)request.getAttribute("errors");
  if(errors==null||errors.equals(""))
	  errors="请选择要下载的文件！";
  %>
  <div><h3><%=errors%></h3></div>
  <table border="1" align="center" width="950px">
    <tr>  
        <td align="center"  height="30px">id</td>
		<td align="center" >文件名</td>
		<td align="center" >文件介绍</td>
		<td align="center" >下载次数</td>
		<td align="center" >操作</td>
    </tr>
    <%
        request.setCharacterEncoding("UTF-8");
        
        int pages = ParamUtil.getInt(request, "pages", 1);
	    int rowsPerPage = ParamUtil.getInt(request, "pageSize", 10);
	    
	    Resources resources=new Resources();
	    ResourcesControl rc=new ResourcesControl();
	    List<Resources> list = new ArrayList<Resources>();
	    list = (List) rc.getResources(pages, rowsPerPage);  
	    for (int i = 0; i < list.size(); i++){
	        resources = list.get(i);
	%>
	   <tr>
		   <td align="center"><%=resources.getId()%></td>
		   <td align="center"><%=resources.getName()%></td>
		   <td align="center"><%=resources.getIntroduction()%></td>
		   <td align="center"><%=resources.getDownloadtimes()%></td>
		   <td align="center">
			   <a href="resources_download_chuli.jsp?id=<%=resources.getId()%>&downfile=<%=resources.getPath()%>">下载</a>
		   </td>
	   </tr>
	   <%}%>
  </table>
<div align="center">	
            <%
	   out.println(ResourcesControl.pageInstance.getToolsMenu(pages));
  %> 
</div>
             <td><br></td>
        <td width="28">
        <table width="20" height="728" border="0">
            <tr>
              <td width="14">&nbsp;</td>
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td height="28" colspan="2" >&nbsp;</td>
      </tr>
    </table>
  </div>
  
  <div id="apDiv1">
    <div id="frontcopyright">
      <div></div>
      <div>&nbsp;</div>
      <div>
        <div align="center"> 2012-2050 东北师范大学学生社团联合会</div>
      </div>
      <div> </div>
      <div>
        <div align="center">制作：杜娟 吴琼 张宇梁 张建颖 焦书海 张家鑫</div>
      </div>
      <div>&nbsp;</div>
      <div>&nbsp;</div>
    </div>
  </div>
</div>
  </body>
</html>
